import { createStore,applyMiddleware} from "redux"
import {  persistReducer } from 'redux-persist'
import storage from 'redux-persist/lib/storage'
import reducer from "../reducers"
import thunk from "redux-thunk"//异步 actions异步操作中间件（react-saga,react-promise）
// import logger from 'redux-logger'
const persistConfig = {
    key: 'root',
    storage,
  }

  const persistedReducer = persistReducer(persistConfig, reducer)
  const store            = createStore(persistedReducer,applyMiddleware(thunk))



export default store   